<template lang="">
    <div>
        <myheader/>
            <van-field
            v-model="form.name"
            name="name"
            label="用户名"
            placeholder="用户名"
            :rules="[{ required: true, message: '请填写用户名' }]"
          />
          <van-field
            v-model="form.level"
            name="level"
            label="等级"
            placeholder="等级"
            :rules="[{ required: true, message: '请填写等级' }]"
          />
          <van-field
            v-model="form.params"
            name="参数"
            label="参数"
            placeholder="参数"
            
          />
          <van-button  round block type='info' style='width:200px' @click='add'>添加</van-button>
    </div> 
</template>
<script>
import myheader from '@/components/myheader'
export default {
    data(){
        return{
            form:{parent:0},
            catelist:{}
        }
    },
    methods: {
        add(){
           
            this.$axios.post('course/cateM',this.form).then(res=>{
                 alert(this.form.parent)
            })
        },
        // getCatelist(){
        //     this.$axios.get('course/cateM').then(res=>{
        //         this.catelist = {'id':0,'name':'顶级','son':res.data.list}
        //         console.log(this.catelist)
        //     })
        // }
    },
    // mounted() {
    //     this.getCatelist()
    // },
    components:{
        'myheader':myheader
    }
}
</script>
<style lang="">
    
</style>